<?php 
	function confirm_level(){
		if($_SESSION['level']==ADMINISTRATOR){//the user is administrator
			$nav_link  = '<li><a href=\'teacher_manage.php\'>'.TEACHERMANAGE.'</a></li>';
			$nav_link .= '<li><a href=\'profile.php\'>'.PASSWORDMODIFY.'</a></li>';
			$nav_link .= '<li><a href=\'meetingroom\' target=\'_blank\'>'.MEETINGRESERVATION.'</a></li>';
			$nav_link .= '<li><a href=\'list_news.php\'>'.NEWSMANANGE.'</a></li>';
			$nav_link .= '<li><a href=\'list_question.php\'>'.QUESTIONDISCUSS.'</a></li>';
			//$nav_link .= '<li><a href=\'dbutil.php\' target=\'_blank\'>'.TEMPDBUTIL.'</a></li>';
			$nav_link .= '<li><a href=\'list_thesis.php\'>'.THESISMANAGE.'</a></li>';
			$nav_link .= '<li><a href=\'sys_manage.php\'>'.SYSMANAGE.'</a></li>';
		}elseif ($_SESSION['level']==TEACHER){//the user is teacher
			$nav_link  = '<li><a href=\'schedule_t.php\'>'.VIEWSCHEDULE.'</a></li>';
			$nav_link .= '<li><a href=\'student_manage.php\'>'.STUDENTMANAGE.'</a></li>';
			$nav_link .= '<li><a href=\'checkin.php\'>'.CHECKIN.'</a></li>';
			$nav_link .= '<li><a href=\'profile.php\'>'.PASSWORDMODIFY.'</a></li>';
			$nav_link .= '<li><a href=\'meetingroom\' target=\'_blank\'>'.MEETINGRESERVATION.'</a></li>';
			$nav_link .= '<li><a href=\'list_weekly_report.php\'>'.WEEKLYREPORT.'</a></li>';
			$nav_link .= '<li><a href=\'list_news.php\'>'.NEWSMANANGE.'</a></li>';
			$nav_link .= '<li><a href=\'list_thesis.php\'>'.THESISMANAGE.'</a></li>';
			$nav_link .= '<li><a href=\'list_question.php\'>'.QUESTIONDISCUSS.'</a></li>';
		}elseif ($_SESSION['level']==STUDENT){//the user is student
			$nav_link  = '<li><a href=\'schedule_s.php\'>'.MANAGESCHEDULE.'</a></li>';
			$nav_link .= '<li><a href=\'profile.php\'>'.PROFILE.'</a></li>';
			$nav_link .= '<li><a href=\'list_weekly_report.php\'>'.WEEKLYREPORT.'</a></li>';
			$nav_link .= '<li><a href=\'create_thesis.php\'>'.COMMITTHESIS.'</a></li>';
			$nav_link .= '<li><a href=\'list_question.php\'>'.QUESTIONDISCUSS.'</a></li>';
		}
		return $nav_link;
	}
?>

<div id="leftnav">
<div class="columntitle">系统导航</div>
<div class="linklist">
	<ul>
		<?php echo confirm_level();?>
	</ul>
</div>
</div>